package xyz.robinbingo.leetcode.a20.b06.c01;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class Solution {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
        int max = Arrays.stream(candies).max().orElse(0);
        return Arrays.stream(candies)
                .mapToObj(i -> i + extraCandies >= max)
                .collect(Collectors.toList());
    }
}